package com.example.shixun.service.impl;

import com.example.shixun.dao.LikeCourseDao;
import com.example.shixun.pojo.LikeCourse;
import com.example.shixun.service.LikeCourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LikeCourseServiceImpl implements LikeCourseService {
    @Autowired
    LikeCourseDao likeCourseDao;

    @Override
    public Integer save(LikeCourse likeCourse) {
        return likeCourseDao.save(likeCourse);
    }

    @Override
    public Integer likeFlag(LikeCourse likeCourse) {
        return likeCourseDao.likeFlag(likeCourse);
    }

    @Override
    public List<LikeCourse> findByUserId(Integer userId) {
        return likeCourseDao.findByUserId(userId);
    }

    @Override
    public List<LikeCourse> findByCourseId(Integer courseId) {
        return likeCourseDao.findByCourseId(courseId);
    }

    @Override
    public Integer deleteLike(LikeCourse likeCourse) {
        return likeCourseDao.deleteLike(likeCourse);
    }
}
